package util.t;

import java.util.Date;



public class DS implements  Comparable<DS>{
    public DS(){}

    private Date date;
    private String name;

    public DS(Date date,String name){
        this.date=date;
        this.name=name;
    }
    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "DS{" +
                "date=" + date +
                ", name='" + name + '\'' +
                '}';
    }
    public int compareTo(DS ds){
//        if(this.date.getTime()>ds.date.getTime()){
//            return 1;
//        }else {
//            return -1;
//        }
        return (int)(this.date.getTime()-ds.date.getTime());
    }

}
